const { exec } = require("../db/mysql");


const update_map = (id, mapData = {}) => {
  let target_id = mapData.target_id;

  const sql = `update glk_menk_mapping set target_id='${target_id}' where id=${id}`;
  return exec(sql).then((updateData) => {
    if (updateData.affectedRows > 0) {
      return true;
    }
    return false;
  });
};

const get_map = () => {
  const sql = `select * from glk_menk_mapping`;
  return exec(sql);
};



module.exports = {
 
  get_map,
  update_map,

};
